package com.tust.service.impl;

import com.tust.dao.SelectionDao;
import com.tust.domain.Selection;
import com.tust.service.SelectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SelectionServiceImpl implements SelectionService {
    @Autowired
    private SelectionDao selectionDao;

    @Override
    public int insertSelection(Selection selection) {
        return selectionDao.insertSelection(selection);
    }

    @Override
    public int deleteSelection(Selection selection) {
        return selectionDao.deleteSelection(selection);
    }

    @Override
    public int updateSelection(Selection oldSelection, Selection selection) {
        return selectionDao.updateSelection(oldSelection, selection);
    }

    @Override
    public List<Selection> selectSelection(Selection selection) {
        return selectionDao.selectSelection(selection);
    }

    @Override
    public List<Selection> selectSelectionByStudentNum(String studentNum) {
        return selectionDao.selectSelectionByStudentNum(studentNum);
    }

    @Override
    public List<Selection> selectSelectionByCourseNum(String courseNum) {
        return selectionDao.selectSelectionByCourseNum(courseNum);
    }

    @Override
    public List<Selection> selectSelectionByElectiveYear(String electiveYear) {
        return selectionDao.selectSelectionByElectiveYear(electiveYear);
    }

    @Override
    public List<Selection> selectSelectionByElectiveSemester(String electiveSemester) {
        return selectionDao.selectSelectionByElectiveSemester(electiveSemester);
    }

    @Override
    public List<Selection> selectSelectionAll() {
        return selectionDao.selectSelectionAll();
    }
}
